﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using StateGrid.MDBservice;

namespace StateGrid.XWLW
{
    /// <summary>
    /// 学位篇名
    /// </summary>
    public class XWLW_PM : PM
    {
        /// <summary>
        /// 分类编码
        /// </summary>
        public String flbm
        {
            get;
            set;
        }
        /// <summary>
        /// 索引编码
        /// </summary>
        public String sybm
        {
            get;
            set;
        }
        /// <summary>
        /// 文件名
        /// </summary>
        public String wjm
        {
            get;
            set;
        }

        /// <summary>
        /// 原文件名
        /// </summary>
        public String ywjm
        {
            get;
            set;
        }

        /// <summary>
        /// 中文题名
        /// </summary>
        public String zwtm
        {
            get;
            set;
        }
        /// <summary>
        /// 英文题名
        /// </summary>
        public String ywtm
        {
            get;
            set;
        }
        /// <summary>
        /// 作者
        /// </summary>
        public String zz
        {
            get;
            set;
        }

        /// <summary>
        /// 导师
        /// </summary>
        public String ds
        {
            get;
            set;
        }
        /// <summary>
        /// 论文级别
        /// </summary>
        public String lwjb
        {
            get;
            set;
        }
        /// <summary>
        /// 学科专业名称
        /// </summary>
        public String xkzymc
        {
            get;
            set;
        }
        /// <summary>
        /// 分类号
        /// </summary>
        public String flh
        {
            get;
            set;
        }

        /// <summary>
        /// 学位授予单位
        /// </summary>
        public String xwsydw
        {
            get;
            set;
        }

        /// <summary>
        /// 论文提交日期
        /// </summary>
        public DateTime lwtjrq
        {
            get;
            set;
        }

        /// <summary>
        /// 论文答辩日期
        /// </summary>
        public DateTime lwdbrq
        {
            get;
            set;
        }
        /// <summary>
        /// 学位授予日期
        /// </summary>
        public DateTime xwsyrq
        {
            get;
            set;
        }
       
        /// <summary>
        /// 中文关键词
        /// </summary>
        public String zwztc
        {
            get;
            set;
        }
        /// <summary>
        /// 中文摘要
        /// </summary>
        public String zwzy
        {
            get;
            set;
        }
        /// <summary>
        /// 英文摘要
        /// </summary>
        public String ywzy
        {
            get;
            set;
        }

        /// <summary>
        /// 英文关键词
        /// </summary>
        public String ywztc
        {
            get;
            set;
        }
        /// <summary>
        /// 分类体系
        /// </summary>
        public String fltx
        {
            get;
            set;
        }
        

        /// <summary>
        /// 年份
        /// </summary>
        public int nf
        {
            get;
            set;
        }
        /// <summary>
        /// 出版日期
        /// </summary>
        public DateTime cbrq
        {
            get;
            set;
        }
        /// <summary>
        /// 页数
        /// </summary>
//        public int ys
//        {
//            get;
//            set;
//        }

        /// <summary>
        /// 更新日期
        /// </summary>
        public DateTime gxrq
        {
            get;
            set;
        }

        /// <summary>
        /// 全文
        /// </summary>
        public String qw
        {
            get;
            set;
        }

        /// <summary>
        /// 登录人
        /// </summary>
        public String dlr
        {
            get;
            set;
        }
        public override string ToString()
        {
            String ret;
            ret = "[索引编码]" + this.sybm + "[中文题名]" + this.zwtm + " [英文题名]" + this.ywtm;
            return ret;
        }

        public override string AllContent()
        {
            String ret = "('" + flbm + "','" + sybm + "','" + wjm + "','" + zwtm + "','" + ywtm + "','" + zz + "','" + ds + "','" + lwjb + "','" + xkzymc + "','" + flh + "','" + xwsydw + "','" + lwtjrq + "','" + lwdbrq + "','" + zwztc + "','" + zwzy + "','" + fltx + "','" + ywzy + "','" + nf + "','" + ywztc + "','" + ywjm + "','" + cbrq + "','" + ys + "','" + xwsyrq + "','" + gxrq + "','" + qw + "','" + dlr + "')";
            return ret;
        }

        public override void fillEmptyStringAsNull()
        {
            String temp = "NULL";
            if (String.Empty.Equals(this.flbm)) flbm = temp;
            if (String.Empty.Equals(this.sybm)) sybm = temp;
            if (String.Empty.Equals(this.wjm)) wjm = temp;
            if (String.Empty.Equals(this.ywjm)) ywjm = temp;
            if (String.Empty.Equals(this.zwtm)) zwtm = temp;
            if (String.Empty.Equals(this.ywtm)) ywtm = temp;
            if (String.Empty.Equals(this.zz)) zz = temp;
            if (String.Empty.Equals(this.ds)) ds = temp;
            if (String.Empty.Equals(this.lwjb)) lwjb = temp;
            if (String.Empty.Equals(this.xkzymc)) xkzymc = temp;
            if (String.Empty.Equals(this.xwsydw)) xwsydw = temp;
            //跳过论文提交日期、论文答辩日期、学位授予日期
            if (String.Empty.Equals(this.zwztc)) zwztc = temp;
            if (String.Empty.Equals(this.zwzy)) zwzy = temp;
            if (String.Empty.Equals(this.ywztc)) ywztc = temp;
            if (String.Empty.Equals(this.ywzy)) ywzy = temp;
            if (String.Empty.Equals(this.fltx)) fltx = temp;
            //跳过年份、出版日期、页数、更新日期
            if (String.Empty.Equals(this.qw)) qw = temp;
        }

        public override void eraseNullInEmptyString()
        {
            String temp = "NULL";
            if (temp.Equals(this.flbm)) flbm = String.Empty;
            if (temp.Equals(this.sybm)) sybm = String.Empty;
            if (temp.Equals(this.wjm)) wjm = String.Empty;
            if (temp.Equals(this.ywjm)) ywjm = String.Empty;
            if (temp.Equals(this.zwtm)) zwtm = String.Empty;
            if (temp.Equals(this.ywtm)) ywtm = String.Empty;
            if (temp.Equals(this.zz)) zz = String.Empty;
            if (temp.Equals(this.ds)) ds = String.Empty;
            if (temp.Equals(this.lwjb)) lwjb = String.Empty;
            if (temp.Equals(this.xkzymc)) xkzymc = String.Empty;
            if (temp.Equals(this.xwsydw)) xwsydw = String.Empty;
            //跳过论文提交日期、论文答辩日期、学位授予日期
            if (temp.Equals(this.zwztc)) zwztc = String.Empty;
            if (temp.Equals(this.zwzy)) zwzy = String.Empty;
            if (temp.Equals(this.ywztc)) ywztc = String.Empty;
            if (temp.Equals(this.ywzy)) ywzy = String.Empty;
            if (temp.Equals(this.fltx)) fltx = String.Empty;
            //跳过年份、出版日期、页数、更新日期
            if (temp.Equals(this.qw)) qw = String.Empty;
         }
    }
}
